<h2 class="title3" style="width: 95%">
	编辑新闻
</h2>
<% form_tag("/content/up_news", :method => :post, :name => "postform") do %>
	<p>
		<label for="new_title" style="font-size: 14px">标题：</label>
		<%= text_field :new, :title, :class => "text",:style => "width:45%" %>
	</p>
	<p>
		<label for="new_title" style="font-size: 14px">分类：</label>
		<% Category.all.each do |category|  %>
      <%= category.name %><%= check_box_tag "categories[]" ,category.id, @new.categories_ids.include?(category.id), :class => "text" %>
		<% end %>
	</p>
	 <%= hidden_field_tag :id, @new.id %>
	<%= render :partial => "share/post_content", :locals => {:post => @new} %>
   <ul class="list-image" id="files">
     <% @new.images.each do |file|%>
       <%= render :partial => "file_field", :locals => {:file => file} %>
     <% end %>
   </ul>
   <br/>
   <%= submit_tag "保存", :class => "submit" %>
<% end %>

<%= render :partial => "share/ajax_upload" %>
